package com.example.annotation.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author fz
 * @creation time 2021/5/19
 */
@Configuration
//配置包扫描路径，com.fzkjjt下配置@component注解的类都会被加载到容器中
@ComponentScan("com.example.annotation")
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class MySpringContext {

    public MySpringContext() {
        System.out.println("容器初始化中......");
    }
}
